Skip to content

test: vendor bats helpers instead of git submodules#88

Merged
chutch3 merged 1 commit into
mainfrom
refactor/vendor-bats-helpers
Jun 23, 2026
Merged

test: vendor bats helpers instead of git submodules#88
chutch3 merged 1 commit into
mainfrom
refactor/vendor-bats-helpers

Conversation

@chutch3

@chutch3 chutch3 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Converts the bats-support / bats-assert test helpers from git submodules to plain vendored files under tests/helpers/.

Why

The submodules used SSH URLs (git@github.com:bats-core/...), so a fresh or HTTPS clone got empty tests/helpers/ dirs and every bats test failed at load test_helper until someone ran git submodule update --init. Silent, confusing friction. These libs are tiny, MIT/CC0-licensed, and change ~once a year — the textbook case for vendoring. Clones now just work.

What changed

  • Vendored each helper trimmed to its essentials — load.bash + src/ + LICENSE (dropped the upstream .github/, test/, CHANGELOG, package.json, etc. — load.bash only sources its own src/). 19 files total.
  • Deleted .gitmodules; removed the submodule gitlinks.
  • .pre-commit-config.yaml: added top-level exclude: ^tests/helpers/ so our hooks never rewrite vendored upstream code (trailing-whitespace tried to).
  • ci-cd.yml: dropped the now-pointless submodules: true from the Lint job checkout.

Verification

  • Full bats suite: 129 passing with the trimmed vendored helpers
  • No submodule remnants (.gitmodules, .git/modules/tests, inner .git all gone)

🤖 Generated with Claude Code

@chutch3 chutch3 merged commit d31ef27 into main Jun 23, 2026
4 checks passed
@chutch3 chutch3 deleted the refactor/vendor-bats-helpers branch June 23, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant